﻿using ASmile.Com;
using ASmile.Win;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using WeifenLuo.WinFormsUI.Docking;

namespace ASmile.Setter
{
    public partial class FrmMain : FrmMDIMain
    {
        public FrmMain()
        {
            InitializeComponent();
        }

        public override DockPanel DockPanelControl { get { return dockPanel1; } }

        protected override ToolStrip ToolStripControl { get { return toolStrip1; } }

        protected override MenuStrip MenuStripControl { get { return menuStrip1; } }

        protected override FrmBase CreateChangeUserForm()
        {            
            return new FrmLogin();
        }

        protected override FrmBase CreateSetUserInfoForm()
        {
            return new FrmUserInfoSet();
        }

        protected override void Init()
        {
            IsRegisterPrintControl = false;
            base.Init();
            tslbUserName.Text = Win.LoginUser.UserName;
            tslbGroupName.Text = Win.LoginUser.DeptName;
            tslbLoginTime.Text = $"{DateTime.Now:yyyy-MM-dd HH:mm:ss}";            
        }

        private void FrmMain_Load(object sender, EventArgs e)
        {
            //var test = ObjectFactory.GetObject<Test>("Test");
            //var aa = test.HelloWold();
            //MessageBox.Show(aa);
        }
    }
}